/**
 * MixinIndex v1.0.0
 * @description shopro-mixin-index 1.0.0 shopro全局入口组件
 * @Author lidongtony
 * @Date 2021-04-18
 * @Email lidongtony@qq.com
 */

import store from '@/store'
export default {

	data() {
		return {
			$IMG_URL: 'https://zc.e0s.cn/img/'
		}
	},
	// #ifdef MP-WEIXIN
	onShareAppMessage(res) {
		let that = this;
		let shareInfo = store.getters.shareInfo;
		console.log(shareInfo);
		return {
			title: shareInfo.title,
			path: shareInfo.path,
			imageUrl: shareInfo.image,
			success(res) {
				uni.showToast({
					title: '分享成功'
				})

			},
			fail(res) {
				uni.showToast({
					title: '分享失败',
					icon: 'none'
				})
			},
			complete() {}
		}
	},
	// onShareTimeline(res) {
	// 	let that = this;
	// 	let shareInfo = store.getters.shareInfo;
	// 	return {
	// 		title: shareInfo.title,
	// 		imageUrl: shareInfo.image,
	// 	}
	// }
	// #endif
}